/*
 * @Author: HeAo
 * @Date: 2021-09-27 09:59:42
 * @LastEditTime: 2021-09-27 10:22:52
 * @LastEditors: HeAo
 * @Description:
 * @FilePath: \web2103-2105\web2103code\3-1-ES6\day03\4-迭代器.js
 * 别乱动！
 */
let arr1 = ['tom', 'vicky', 'jacky']
let keys = arr1.keys()
let values = arr1.values()
let entries = arr1.entries()

// console.log(values.next());
// console.log(values.next());
// console.log(values.next());
// console.log(values.next());

// for of 循环的重构（实现）
// let item;
// while (!(item = values.next()).done) {
//   console.log(item.value);
// }

// for of
for (let value of values) {
  console.log(value);
}
for (let entry of entries) {
  console.log(entry);
}






